package top.suven.base.http.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName:
 * @Description:
 * @Author liulu
 * @Date 2018/5/30 20:03
 * @Copyright: (c) 2018 gc by https://www.gc.com.cn/
 * @Version : 1.0.0
 */
public enum SysDefineCodeEnumType {
    //活动编码
    ACTIVITY_CODE_RBC("rbc","红豆活动"),
    ACTIVITY_CODE_WECHART_LOTTERY("wechartLottery","微信抽奖"),
    ACTIVITY_CODE_GOODS("goods","套餐活动"),
    ACTIVITY_CODE_SVIP("svip","超级VIP活动"),
    ACTIVITY_CODE_COUPON("coupon","优惠券活动"),
    ACTIVITY_CODE_TIME("time","赠送设备时长"),//-给购买人赠送
    ACTIVITY_CODE_WALLET_RECHARGE("wallet_recharge","钱包充值"),
    ACTIVITY_CODE_INVITE_TIME("invite_time","邀请购买赠送")/**给邀请人赠送*/,
    ACTIVITY_CODE_INVITE_TIME_COUPON("invite_time_coupon","邀请登录赠送"),
    ACTIVITY_CODE_INVITE_SIGNUP_BOX("invite_signup_box","邀请注册送平安礼盒"),
    ACTIVITY_CODE_INVITE_BUY_BOX("invite_buy_box","邀请注册送圣诞礼盒"),
    ACTIVITY_CODE_INVITE_LOTTERY("invite_lottery","邀请注册抽奖"),
    ACTIVITY_CODE_INVITE_BUY_LOTTERY("invite_buy_lottery","邀请购买抽奖"),
    ACTIVITY_CODE_CUMULATIVE_LOGIN("cumulative_login","累计登录"),
    ACTIVITY_CODE_DAILY_LOGIN("daily_login","每日登录"),
    ACTIVITY_CODE_NOVICE_COUPON("novice_coupon","新手折扣券"),
    ACTIVITY_CODE_DAILY_SIGN_IN("daily_sign_in","每日签到"),
    ACTIVITY_CODE_DAILY_WALLET_RECHARGE("daily_walletRecharge","每日钱包充值"),
    ACTIVITY_CODE_BIG_LOTTERY("big_lottery","大转盘活动"),
    ACTIVITY_CODE_LITTLE_LOTTERY("little_lottery","小转盘活动"),
    ACTIVITY_CODE_LOGIN_RED_PACKETS("login_red_packets","登录赠送辞旧红包"),
    ACTIVITY_CODE_INVITEE_RED_PACKETS("invitee_red_packets","邀请赠送迎新红包"),
    ACTIVITY_CODE_BUY_RED_PACKETS("buy_red_packets","购买赠送助力红包"),
    ACTIVITY_CODE_VALENTINE_IMAGE("valentine_image","情人节图片活动"),
    ACTIVITY_CODE_INVITE_TASK("invite_task","推广任务"),
    ACTIVITY_CODE_SHARE_RBC("share_rbc","分享红豆"),
    ACTIVITY_CODE_SHARE_COUPON("share_coupon","分享优惠卷"),
    ACTIVITY_CODE_SHARE_PADTIME("share_padTime","分享设备时间"),

    //任务类型
    TASK_TYPE_EVERY_DAY("everyday","每日任务"),
    TASK_TYPE_USER_DATA("userdata","完善资料"),
    TASK_TYPE_WJDC("wjdc","问卷调查"),
    TASK_TYPE_GAME_DOWNLOAD("gamedownload","游戏下载"),
    TASK_TYPE_GANERALIZE("ganeralize","推广任务"),
    TASK_TYPE_BASE("base","基本任务"),
    TASK_TYPE_GAME_TASK("gametask","游戏任务"),

    //任务编码
    TASK_CODE_DAY_SIGNIN("signin","签到任务"),
    TASK_CODE_DAY_BUY_PACKAGE("BuyPackage","商城购买礼包"),
    TASK_CODE_DAY_SCRIPT_UPLOAD("ScriptUpload","脚本上传"),
    TASK_CODE_DAY_RBC_EXCHANGE("RbcExchange","红豆兑换设备"),
    TASK_CODE_DAY_SEE_HELP("SeeHelp","查看帮助"),
    TASK_CODE_DAY_ADJUST_RESOLUTION("AdjustResolution","调整画质"),
    TASK_CODE_DAY_CONTROLLER_PAD("ControllerPad","控制一次设备"),
    TASK_CODE_DAY_ANY_GAME_DOWNLOAD("AnyGameDownload","任意游戏下载"),
    TASK_CODE_BUY_VIP("BuyVIP","购买VIP"),
    TASK_CODE_UPLOAD_HEAD_IMG("UploadHeadImg","上传头像"),
    TASK_CODE_MODIFY_NICKNAME("ModifyNickname","修改昵称"),
    TASK_CODE_BIND_EMAIL("BindEmail","绑定邮箱"),
    TASK_CODE_REBOOT_PAD("RebootPad","重启设备"),
    TASK_CODE_PAD_GRANT("PadGrant","授权一次设备"),
    TASK_CODE_MODIFY_USER_DATA("ModifyUserData","修改用户信息"),
    TASK_CODE_FINISH_ANY_GAME_TASK("FinishAnyGameTask","完成一次游戏子任务"),
    TASK_CODE_INVITE_BUY("InviteBuy","邀请好友注册后充值购买"),
    TASK_CODE_BIND_WX("BindWX","绑定微信"),


    USER_LABEL_ACTIVITY("activity", "用户活动标签"),
    USER_LABEL_TASK("task", "用户任务标签"),
    USER_LABEL_GAME_PACKAGE("gamePackage", "用户游戏礼包标签"),

    PAD_USER_CONTROL("USER","用户控制节点"),PAD_DEVICE_CONTROL("DEVICE","设备控制节点"), PAD_MANAGE_CONTROL("MANAGE","设备管理节点"),
    ;

    // 成员变量
    private String code;
    private String name;

    private static Map<String,SysDefineCodeEnumType> enumMap = new HashMap<>();
    static {
        for(SysDefineCodeEnumType enumType : values()) {
            enumMap.put(enumType.code, enumType);
        }
    }

    // 构造方法
    private SysDefineCodeEnumType(String code, String name) {
        this.name = name;
        this.code = code;
    }
    // 普通方法
    public static String getName(String code) {
        SysDefineCodeEnumType enumType =  enumMap.get(code);
        if(null != enumType){
          return   enumType.name;
        }
        return null;
    }
    // get set 方法
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
}
